<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Link Menu</title>
<style>
body,td,th {
	font-family: Tahoma, Verdana, Arial, sans-serif;
	font-size: 12px;
	color: #000079;
}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
a {
	color: #000079;
	text-decoration: none;
}
a:hover {
	color: #007979;
	text-decoration: none;
}
a:active{
	color: #000079;
	text-decoration: none;
}
#menu{
	height:32px;
	margin-top:8px; background-color:#0072E3;
}
#menu ul{
	margin:auto; width:778px; height:32px;
	list-style-type:none; padding:0px; margin-top:0px; margin-bottom:0px;
}
.m_li{
	float:left; width:114px; line-height:32px;  text-align:center; margin-right:-2px; margin-left:-2px;
}
.m_li a{
	display:block; color:#000079; width:114px;
}
.m_line{
	float:left; width:1px; height:32px;
	line-height:32px;   
}
.m_line img{
	margin-top:expression(( 32 - this.height ) / 2);   
}
.m_li_a{
	float:left; width:114px; line-height:32px; text-align:center; padding-top:3px; font-weight:bold;
	background-image:url(/jscss/demoimg/200904/menu_bg2.jpg); position:relative; height:32px; margin-top:-3px; margin-right:-2px; margin-left:-2px;
}
.m_li_a a{
	display:block; color:#000079; width:114px;
}

.smenu{
	width:774px; margin:0px auto 0px auto; padding:0px; list-style-type:none; height:32px;
}
.s_li{
	line-height:32px; width:auto; display:none; height:32px; 
}
.s_li_a{
	line-height:32px; width:auto; display:block; height:32px; 
}
</style>
<script>
//init
var def="1";
function mover(object){
  //menu main
  var mm=document.getElementById("m_"+object);
  mm.className="m_li_a";
  //hide effect
  if(def!=0){
    var mdef=document.getElementById("m_"+def);
    mdef.className="m_li";
  }
  //menu son
  var ss=document.getElementById("s_"+object);
  ss.style.display="block";
  //hide menu son
  if(def!=0){
    var sdef=document.getElementById("s_"+def);
    sdef.style.display="none";
  }
}

function mout(object){
  var mm=document.getElementById("m_"+object);
  mm.className="m_li";
  if(def!=0){
    var mdef=document.getElementById("m_"+def);
    mdef.className="m_li_a";
  }
  var ss=document.getElementById("s_"+object);
  ss.style.display="none";
  if(def!=0){
    var sdef=document.getElementById("s_"+def);
    sdef.style.display="block";
  }
}
function chanPage(object){
	var link;
	var userId=document.getElementById("userId").value;
	var i;
	i=1;
	
	switch(object){
	case "mainPage":
		link="toAllEvent.jsp";
		break;
	case "us":
		link="us.jsp";
		break;
	case "crEvt":
		link="addEvent.jsp";
		break;
	case "genererEvt":
		link="GetMyEvents?types=MyOrganisedEvents&idUser="+userId;
		break;
	case "parEvt":
		link="GetMyEvents?types=MyFutureEvents&idUser="+userId;
		break;
	case "myEvt":
		link="myEvt.jsp";
		break;
	case "tsEvt":
		link="tsEvt.jsp";
		break;
	case "register":
		link="addUser.jsp";
		break;
		
	}
	alert(link);
	window.parent.frames[i].location.href=link; 
}
function tt(){
	alert("test");
}
</script>
</head>
<body>
<%
	String userId=(String)request.getSession().getAttribute("id");
%>


<div id="menu">
  <ul>
    <li id="m_1" class='m_li' onmouseover='mover(1);' onmouseout='mout(1);'><a href="" onClick="chanPage('mainPage');">Home</a></li>
    <li id="m_2" class='m_li' onmouseover='mover(2);' onmouseout='mout(2);'><a href="">Events</a></li>
    <li id="m_3" class='m_li' onmouseover='mover(3);' onmouseout='mout(3);'><a href="">Rechercher Event</a></li>
    <li id="m_4" class='m_li' onmouseover='mover(4);' onmouseout='mout(4);'><a href="" onClick="chanPage('us');">Nous contacter</a></li>
    <li id="m_5" class='m_li' onmouseover='mover(5);' onmouseout='mout(5);'><a href="" onClick="chanPage('register');">register</a></li>
  </ul>
</div>
<div style="height:32px; background-color:#F1F1F1;">
   <ul class="smenu">
     <li style="padding-left:252px;" id="s_3" class='s_li' onmouseover='mover(3);' onmouseout='mout(3);'><a href="" onClick="chanPage('myEvt')">My event</a>  |  <a href="" onClick="chanPage('tsEvt')">All event</a></li>
   </ul>
</div>
<input type="hidden" value=<%=userId%>  id="userId" ></input>
</body>
</html>